<template>
  <div class="container">
    <LeftMaster v-if="!showDetail" @changeShowDetail="changeShowDetail"></LeftMaster>
    <markdownView :url="mdUrl" v-else="showDetail"></markdownView>
    <RightBody></RightBody>
  </div>
</template>

<script setup lang='ts'>
import { ref } from "vue"
import LeftMaster from "@/page/main/leftMaster.vue"
import RightBody from "@/page/public/rightBody/index.vue"
import markdownView from "@/components/markdownView.vue"

let showDetail = ref<boolean>(false);
let mdUrl = ref<string>("")

const changeShowDetail = (url: string) => {
  mdUrl.value = url;
  showDetail.value = true
}

</script>
<style scoped lang="scss">
.container {
  display: flex;
  flex-direction: row;
  margin-top: 10px;
  justify-content: center;
}
</style>